import { UnitRepository } from '@/models';

const buildResponseSchema = (responseSchema: any, type: string) => {
  // return ;
  // console.log(responseSchema.swaggerDocument);
  return {
    type: 'object',
    properties: {
      msg: { type: 'string', required: false },
      code: { type: 'number', required: false },
      data: {
        type: type,
        properties: responseSchema.swaggerDocument,
      },
    },
  };
};

export default buildResponseSchema;
